package com.demo.Controller;

import com.demo.Controller.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * author:李四
 */
@Controller
public class UserController {

    @Autowired
    private User user;

    public void getUser() {
        System.out.println("张三 : " + user);
        User u = user;
        u.setName("李四");
        System.out.println("李四 : " + u);
    }

}